package java101.Cheats;

public class MathExpressions {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		double addition;
		int a = 10;
		addition = a + 3;
		System.out.println("Addition: " + addition + " is 10 + 3.");
		
		System.out.println();
		
		double subtraction;
		int b = 10;
		subtraction = b -3;
		System.out.println("Subtraction: " + subtraction + " is 10 - 3.");
		
		System.out.println();
		
		double multiplication;
		int c = 10;
		multiplication = c * 2;
		System.out.println("Multiplication: " + multiplication + " is 10 multiplied by 2.");
		
		System.out.println();
		
		double division;
		int d = 10;
		division = d / 2;
		System.out.println("Division: " + division + " is 10 divided by 2.");
		
		System.out.println();
		
		double remainder;
		int e = 10;
		remainder = e % 3;
		System.out.println("Remainder: " + remainder + " is the remainder of 10 divided by 3.");
		
		System.out.println();		
		
		double increment;
		int f = 10;
		increment = ++f;
		System.out.println("Increment: " + increment + " is 10 + 1.");		
		
		System.out.println();		
		
		double decrement;
		int g = 10;
		decrement = --g;
		System.out.println("Decrement: " + decrement + " is 10 - 1.");
		
		System.out.println();
				
		double negative;
		int h = 10;
		negative = -h;
		System.out.println("Negavite: " + negative + " is -10.");
		
		System.out.println();
				
		int i = 10;
		double additionshortcut = i;
		additionshortcut += 3;
		System.out.println("Addition Shortcut: " + additionshortcut + " is 10 + 3.");
		
		System.out.println();		
		
		int j = 10;
		double multiplicationshortcut = j;
		multiplicationshortcut *= 3;
		System.out.println("Multiplication Shortcut: " + multiplicationshortcut + " is 10 times 3.");
			
		System.out.println();
			
		double exponent;
		exponent = (int) Math.pow(2, 3);
		System.out.println("Exponents: " + exponent + " is 2 to the power of 3.");
			
		System.out.println();
			
		double random;
		random = Math.random();
		System.out.println("Random: " + random + " is a random number.");
		
		System.out.println();
		
		System.out.println("Shifting bits to the left: ");
		long k = 2<<5;
			System.out.println(k + " is equal to 2 shifted to the left 5 times, in base 2 counting.");
		
		System.out.println();
			
		System.out.println("Shifting bits to the right: ");
		long l = 128>>5;
			System.out.println(l + " is equal to 128 shifted to the right 5 times, in base 2 counting.");
		
	}
	
}